FWTool supports many command line options. One command line option, “-help”, outputs a summary of all command line options. For example, executing the command
-Sym Generate symbolic debugging information (default)
-NoSym Don't generate symbolic debugging information
-000 Generate 68000 code (default for 68K)
-020 Generate 68020 code (68K only!)
-030 Generate 68030 code (68K only!)
-040 Generate 68040 code (68K only!)
-PPC Generate PPC code (PPC only!)
-modelNear Use near memory model (default for 68K)
-modelFar Use far memory model (68K only!)
-modelCFMSeg Use CFM segmented memory model (68K only!)
-modelCFMFlat Use CFM flat memory model (68K only!)
-F Specify a specific make file to use
-List Generate preprocessed source listings during compile
-NoList Don't generate preprocessed source listings during compile (default)
-Deps Include object files dependencies in make sequence (default)
-NoDeps Don't include object files dependencies in make sequence
-Help Show usage
-?? Show usage
Clearly, FWTool recognizes a large number of options. Many of these options are related, and will be discussed below in logical groups.
NOTE: Some of these options are obsolete and will be removed in a future release. They may not work in this release. These options are marked OBSOLETE below. Other options are not currently supported fully, though we intend to support them in a future release. These options are marked UNSUPPORTED. See also the Future Directions section below.
Build Suite Specification
-xxx Use build suite xxx (see bldsuite.txt)
Any string of characters following a hyphen (‘-’) that is not recognized as a specific option is considered to be the name of a build suite. If the build suite name appears in BldSuite.txt, then the option is considered a specification of the build suite to be used for this build. If no build suite is specified, then FWBuild defaults to the first build suite defined in BldSuite.txt.
Output File Specification
-o xxx Send output to filename xxx
The -o option is used to specify the output of FWTool. The script FWBuild uses this option to direct the output to the file “{FWTempDir}FWBuild.tmp”, so normally this option would not be specified on the FWBuild command line.
Tool Overrides
-Echo xxx Use Echo Tool xxx
-Make xxx Use Make Tool xxx
-Asm xxx Use Assembler xxx
-C xxx Use C Compiler xxx
-Cpp xxx Use C++ Compiler xxx
-Link xxx Use Linker xxx
-Lib xxx Use Librarian xxx
-ODFRC xxx Use ODFRC tool xxx
-RC xxx Use Resource Compiler xxx
Each of the above options can be used to override a specific tool of a build suite. These options are sometimes useful when several vendors provide compatible tools, and one wants to switch out a individual tool for a given suite without defining a new suite. However, it is generally safer (in a configuration management sense) to define a new suite.
Tool Options
-EchoOptions xxx Specify options xxx to the Echo Tool
-MakeOptions xxx Specify options xxx to the Make Tool
-AsmOptions xxx Specify options xxx to the Assembler
-COptions xxx Specify options xxx to the C Compiler
-CppOptions xxx Specify options xxx to the C++ Compiler
-LinkOptions xxx Specify options xxx to the Linker
-LibOptions xxx Specify options xxx to the Librarian
-ODFRCOptions xxx Specify options xxx to the ODFRC Tool
-RCOptions xxx Specify options xxx to the Resource Compiler
Each of the above options can be used to specify options that will be passed to a specific tool. For example, one might do the following
FWBuild -CppOptions '-D qSpecialDebugging=1' ...
This would append the string ‘-D qSpecialDebugging=1’ to every C++ command line in the current build. Note that FWBuild does not change the target build directories used when you specify tool command line options this way, so using this option requires that you consider the impact on configuration management (e.g. do you need to do a full rebuild so that all C++ files are recompiled with this flag defined?).
Global Macro Definitions (UNSUPPORTED)
-D xxx Define a macro xxx for all tools
-U xxx Undefine a macro xxx for all tools
This option will define a symbol for every MPW tool invoked (including Make itself) as if a #define was in the source code.
FWTool Progress
-Progress Display progress
-NoProgress Don't display progress
These options control whether FWTool outputs additional progress information. By default no progress information is output.
Build All Option
-E Build everything = TRUE
This option will force a full rebuild.
Precompiled Header Options (UNSUPPORTED)
-PCH Use precompiled headers = TRUE
-NoPCH Don't use precompiled headers
These options control whether precompiled headers are built and used.
NOTE: These options are currently not supported, but we plan to support them in a future release. They aren’t needed for CodeWarrior builds.
Build Time Options
-Times Track build times
-NoTimes Don't track times
These options control whether FWBuild inserts commands to track the time required to complete a build.
Alignment Options (OBSOLETE)
-Align Align code and data to 16 bit boundaries
-NoAlign Don't align code and data to 16 bit boundaries
These options specify data alignment.
Separate Build Target Directories Options
-Separate Place object files in separate build directories
-NoSeparate Don't place object files in separate build directories
These options specify whether FWBuild separates all build targets into separate build target directories. The default is -NoSeparate, and results in the use of target directories as described in the section “Build Target Directories” above.
Run Options (OBSOLETE)
-Run Run the target after successful build
-NoRun Don't run the target after successful build
These options specify whether the final build target is executed after it is successfully built. The default is -NoRun.
Fail Options (UNSUPPORTED)
-Fail Stop on failure
-NoFail Don't stop on failure (attempt to build all dependents)
These options specify whether the build continues after errors are encountered. The default is -Fail.
These options specify whether FWBuild attempts to bring the entire system up-to-date. The default is -NoAutoBuild. Specifying -AutoBuild causes FWBuild to also build all targets specified in the file {FWToolsDir}autotarg.txt.
Debug Options
-Debug Define debug macros for build
-NoDebug Don't define debug macros for build
These options specify whether FWBuild defines an ODF-Specific preprocessor symbol (FW_DEBUG) for code that is to be compiled in debug-only builds. The default is -Debug.
Symbolic Information Options (UNSUPPORTED)
-Sym Generate symbolic debugging information
-NoSym Don't generate symbolic debugging information
These options control whether final build targets will contain symbolic debugging information. The default is -Sym.
Code Generation (UNSUPPORTED)
-000 Generate 68000 code
-020 Generate 68020 code
-030 Generate 68030 code
-040 Generate 68040 code
-PPC Generate PowerPC code
These options specify the type of code generation.
Runtime Model Options
-modelNear Use near memory model
-modelFar Use far memory model
-modelCFMSeg Use CFM segmented memory model (68K only!)
-modelCFMFlat Use CFM flat memory model (68K only!)
These options specify the runtime model. The options are all ignored for PowerPC builds.
Makefile options
-F Specify a specific make file to use
-Pre Specify an additional pre-makefile
-Post Specify an additional post-makefile
The -f option specifies a makefile to use instead of MacMake.bmk. The -Pre and -Post options specify makefiles that will be processed respectively just before and just after the MacMake.bmk file (or if the -f option is used, the Makefile specified by that option).
List Options (OBSOLETE)
-List Generate preprocessed source listings during compile
-NoList Don't generate preprocessed source listings during compile
These options specify whether preprocessor listings are created during source compiles.
Dependency Options (UNSUPPORTED)
-Deps Include object file dependencies in make sequence
-NoDeps Don't include object file dependencies in make sequence
These options specify whether the MacMake.dep files are used or not. The default is -Deps.
Help Options
-Help Show usage
-?? Show usage
These options specify whether FWBuild emits the usage message.
Known Limitations and Future Directions
FWBuild was inspired by MacApp’s MABuild. It has been in use for more than two years, being maintained on an as-needed basis. Future changes will all be focused on making it possible to extend FWBuild to support changing and adding build environments without recompiling FWTool. This will require moving some hard-coded information from within FWTool to be specified in the various configuration files (BldSuite.txt, BldTools.txt, etc.). With this approach, it will probably be necessary to define additional suites instead of using command line options. For example, in the past FWTool understood the concept of “debug” vs. “non-debug” builds, and knew how this option affected the various tools used to create a build. Unfortunately, this meant that FWTool had to be modified to support building with a new compiler.
As command line compiler environments, such as MPW, seem to be rapidly being replaced by all-in-one, stand-alone IDE systems such as Symantec C++, Metrowerks CodeWarrior, and Microsoft's Visual C++, we expect FWBuild to eventually be phased out. We will concentrate our efforts around automating builds using AppleScript and IDE's rather than revising FWBuild. It would seem that the direction that tools have taken have made some of the advantages of FWBuild unnecessary.